This is a refcounting bug. Be very verbose about it instead of trying to
call a function that releases a reference to the widget without
references.
gtk_list_list_model_clear (priv->controller_observer);
if (priv->parent)
- gtk_widget_unparent (widget);
+ {
+ g_critical ("%s %p has a parent %s %p during dispose. Parents hold a reference, so this should not happen.\n"
+ "Did you call g_object_unref() instead of gtk_widget_unparent()?",
+ G_OBJECT_TYPE_NAME (widget), widget,
+ G_OBJECT_TYPE_NAME (priv->parent), priv->parent);
+ priv->parent = NULL;
+ }
while (priv->paintables)
gtk_widget_paintable_set_widget (priv->paintables->data, NULL);